﻿using System.ServiceModel;

namespace Ipmce.RemoteVoting.Common.Tools.Wcf.Unity.LifetimeManagers
{
	/// <summary>
	/// Implements the lifetime manager storage for the <see cref="System.ServiceModel.ServiceHostBase"/> extension.
	/// </summary>
	public class UnityServiceHostBaseExtension : UnityWcfExtension<ServiceHostBase>
	{
		/// <summary>
		/// Gets the <see cref="UnityServiceHostBaseExtension"/> for the current service host.
		/// </summary>
		public static UnityServiceHostBaseExtension Current
		{
			get
			{
				return OperationContext.Current.Host.Extensions.Find<UnityServiceHostBaseExtension>();
			}
		}
	}
}